package ctn.contant;

import java.util.HashMap;
import java.util.Map;

import ctn.event.CTNEventAddPJ;
import ctn.event.CTNEventCheckFun;
import ctn.event.CTNEventDelete;
import ctn.event.CTNEventDropFun;
import ctn.event.CTNEventResetPWD;
import ctn.event.CTNEventTransferFun;

public class PlugContant {
	//system
	public final static String SPRING_CONFIG_PATH = "common/spring-config.xml";
	public final static String FILE_SEPARATE="/";
	public final static String STATUS_APPROVE="A"; //项目申请
	public final static String STATUS_WAIT="W";    //项目未开始
	public final static String STATUS_DOING="D";   //项目正在进行中
	public final static String STATUS_CLOSE="C";   //项目关闭
	public final static String STATUS_WAIT_CLOSE="WC";   //项目关闭
	public final static String STATUS_END="E";     //项止完成
	
	public final static String LINK_CONTEXT="link.context"; //服务器地址
	public final static String LINK_KEEP_EFFECTIVE="link.keep.time";//连接有效时长 ms
	public final static String LINK_PARM_USER="userID";
	public final static String LINK_PARM_UUID="uuid";
	
	public final static String Link_APPROVE_STATUS_APPROVE="A";
	public final static String Link_APPROVE_STATUS_DONE="D";
	//eventID and Event Class
	public final static String EVENT_DELETE="del";
	public final static String EVENT_ADDPJ="addpj";
	public final static String EVENT_CHECK_FUN="checkfun";
	public final static String EVENT_DROP_FUN="dropfun";
	public final static String EVENT_TRAN_FUN="tranfun";
	public final static String EVENT_RESET_PWD="resetpwd";
	
	public  static Map<String,String> eventMap=new HashMap<String, String>();
	static{
		eventMap.put(EVENT_DELETE, CTNEventDelete.class.getName());
		eventMap.put(EVENT_ADDPJ, CTNEventAddPJ.class.getName());
		eventMap.put(EVENT_CHECK_FUN, CTNEventCheckFun.class.getName());
		eventMap.put(EVENT_DROP_FUN, CTNEventDropFun.class.getName());
		eventMap.put(EVENT_TRAN_FUN, CTNEventTransferFun.class.getName());
		eventMap.put(EVENT_RESET_PWD, CTNEventResetPWD.class.getName());
	}
	
	//E-Mail
	public final static String E_MAIL_STAMP_HOST = "mail.smtp.host";
	public final static String E_MAIL_STAMP_AUTH = "mail.smtp.auth";
	public final static String E_MAIL_STAMP_AUTH_TRUE = "true";
	public final static String E_MAIL_STAMP_HOST_KEY = "mail.smtp";
	public final static String E_MAIL_STAMP_USER_KEY = "mail.smtp.from.user";
	public final static String E_MAIL_STAMP_PWD_KEY = "mail.smtp.from.password";
	public final static String E_MAIL_STAMP_ADDRESS_KEY = "mail.smtp.from.address";
	public final static String E_MAIL_STAMP_SOCKET_FACTORY_CLASS = "mail.smtp.socketFactory.class";
	public final static String E_MAIL_STAMP_SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
    public final static String E_MAIL_STAMP_SOCKET_FACTORY_FALLBACK = "mail.smtp.socketFactory.fallback";
    public final static String E_MAIL_STAMP_PORT = "mail.smtp.port";
    public final static String E_MAIL_STAMP_SOCKET_FACTORY_PORT = "mail.smtp.socketFactory.port";
    public final static String E_MAIL_STAMP_SSL = "mail.smtp.ssl";
    public final static String E_MAIL_STAMP_QUITWAIT = "mail.smtp.quitwait";
    
    //Message status
    public final static String MESSAGE_STATUS_WAIT_TO_SEND = "W";
    public final static String MESSAGE_STATUS_SUCCESS_TO_SEND = "S";
    public final static String MESSAGE_STATUS_FAILURE_TO_SEND = "F";
    
    //rule
    public final static String RULE_MAX_DELAY_DAY = "rule.max.delay.day";
	public final static String RULE_MAX_STAGE_SIZE = "rule.max.stage.size";
	public final static String RULE_FAILED_LEVEL_DIVIDE = "rule.failed.level.divide";
	public final static String RULE_INITIATION_LEVEL_VALUE = "rule.initiation.level.value";
	public final static String RULE_INITIATION_FAILED_VALUE = "rule.initiation.failed.value";
	public final static String RULE_AWARD_DAY = "rule.award.day";
	public final static String RULE_MAX_LEVEL = "rule.max.level";
	public final static String RULE_MAX_FAILED = "rule.max.failed";
	public final static String RULE_BATCH_JOB_FREQUENCY = "rule.batch.job.frequency";
	public final static String RULE_RELEASE_PLAN_END_DATE_RESET_RATE = "rule.release.plan.end.date.reset.rate";
	
	//function status
	public final static String FUN_STATUS_MOVED = "M";
	public final static String FUN_STATUS_WAIT = "W";
	public final static String FUN_STATUS_COMPLETE = "C";
	public final static String FUN_STATUS_DOING = "D";
	public final static String FUN_STATUS_READY = "R";
	public final static String FUN_STATUS_END = "E";
	public final static String FUN_STATUS_WAIT_FOR_TRAN="WM";
	public final static String FUN_STATUS_WAIT_FOR_DROP="WD";
	public final static String FUN_STATUS_WAIT_FOR_COMP="WC";
	
	//spec typ
	public final static String SPEC_TYPE_REQUIREMENT="R";
	public final static String SPEC_TYPE_PROGRAMSPEC="P";
	public final static String SPEC_TYPE_OTHER="O";
}
